const mongoose = require('mongoose');

const indentSchema = new mongoose.Schema({
    usersNameId: {
        type: mongoose.Schema.Types.ObjectId,
        ref: "users"
    },
    movieId: {
        type: mongoose.Schema.Types.ObjectId,
        ref: "movies"
    }, // 电影 id
    cinemasId: {
        type: mongoose.Schema.Types.ObjectId,
        ref: "cinemas"
    }, // 影院 id
    theatersId: {
        type: mongoose.Schema.Types.ObjectId,
        ref: "theaters"
    },// 放映厅 id
    schedulesId: {
        type: mongoose.Schema.Types.ObjectId,
        ref: "schedules"
    }, // 排片 id
    seatsId: {
        type: mongoose.Schema.Types.ObjectId,
        ref: "seating"
    },// 座位id
    seatingId: {
        type: mongoose.Schema.Types.ObjectId,
        ref: "seats"
    },//选座号
    status: Boolean,
    price: String,// 价格
    data: String,//日期
    date: String,//时间戳
    seatsArr: Array
});

mongoose.model('indent', indentSchema, "indent");